import { hex_md5 } from '@/utils/md5.js'
export function getSign(data){
    // secret
    let secret = "7#dmU7w9gCK4nfZx";
    let keyArr = [];
    for( let key in data ){
        keyArr.push(key)
    }
    keyArr = keyArr.sort()
    let str = '';
    for (var i = 0; i < keyArr.length; i++) {
        str += `${keyArr[i]}=${data[keyArr[i]]}&`;
    }
    str += `secret=${secret}`;
    return hex_md5(encodeURIComponent(str));
}